﻿using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.TeamFoundation.Client;

namespace TFSTools.TFSLibrary
{
    public abstract class TFSServerEntity
    {
        private ITFSConnection tfsConnection;

        /// <summary>
        /// Initializes a new instance of the <see cref="TFSServerEntity"/> class.
        /// </summary>
        /// <param name="connection">The connection.</param>
        internal TFSServerEntity(ITFSConnection connection) 
        {
            this.tfsConnection = connection;
        }

        internal TfsTeamProjectCollection SelectedTeamProjectCollection
        {
            get { return this.tfsConnection.SelectedTeamProjectCollection; }
        }

        /// <summary>
        /// Gets the TFSConnection object.
        /// </summary>
        /// <value>The TFSConnection object.</value>
        public ITFSConnection Connection { get { return this.tfsConnection; } }        
    }
}
